const {
  runOnJS,
} = wx.worklet;

Page({

  /**
   * 页面的初始数据
   */
  data: {
    zh: '',
    schema:[],
    formData:{
    },
    title: '',
    result: '',
    remark: '',
    webUrl: '',
    apiName: '',
    showPrivacy: false
  },
  onUnload() {
  },
  onLoad(options) {
    console.log('options', options)
    wx.setNavigationBarTitle({
      title: options.title,
    })
    
    this.setData({
      title: options.title,
      zh:options.zh,
      remark: options.remark,
      webUrl: options.webUrl
    })
  },
  getFormData(e) {
    console.log('formdata==', e.detail.formData);
    this.setData({
      formData: e.detail.formData
    })
  },
  ongesture(e) {
    'worklet'
    runOnJS(this.setResult.bind(this))(e)
  },
  setResult(e) {
    this.setData({
      result: e,
      apiName: 'double-tap-gesture-handler'
    })
  },
  responseonmove(e) {
    "worklet"
    console.log('responseonmove', e);
    return true;
  },
  acceptgesture(e) {
    "worklet"
    console.log(e, '=acceptgesture');
    return true;
  }
})